﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Logging.Viewer._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title>Simple Log Viewer</title>
</head>
<body>
	<form id="form1" runat="server">
	Event ID:<asp:TextBox ID="tbEventId" runat="server"></asp:TextBox>
	<asp:Button ID="bSearch" runat="server" Text="Search" OnClick="bSearch_Click" />
	<hr />
	<asp:FormView ID="fvDetails" runat="server" Width="100%" Visible="false">
		<ItemTemplate>
			<table border="1">
				<tr>
					<th colspan="2">
						<asp:Label ID="lblHead" runat="server" Text='<%# Eval("EventId", "Event detail for {0}").ToString() %>'></asp:Label>
					</th>
				</tr>
				<tr>
					<td width="210">
						<b>Event Id:</b>
					</td>
					<td>
						<asp:Label ID="lEventId" runat="server" Text='<%# Eval("EventId").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Event Time Utc:</b>
					</td>
					<td>
						<asp:Label ID="lEventTimeUtc" runat="server" Text='<%# Eval("EventTimeUtc").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Event Time:</b>
					</td>
					<td>
						<asp:Label ID="lEventTime" runat="server" Text='<%# Eval("EventTime").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Event Type:</b>
					</td>
					<td>
						<asp:Label ID="lEventType" runat="server" Text='<%# Eval("EventType").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Event Sequence:</b>
					</td>
					<td>
						<asp:Label ID="lEventSequence" runat="server" Text='<%# Eval("EventSequence").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Event Occurrence:</b>
					</td>
					<td>
						<asp:Label ID="lErrorOccurrence" runat="server" Text='<%# Eval("EventOccurrence").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Event Code:</b>
					</td>
					<td>
						<asp:Label ID="lEventCode" runat="server" Text='<%# Eval("EventCode").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Event Detail Code:</b>
					</td>
					<td>
						<asp:Label ID="lEventDetailCode" runat="server" Text='<%# Eval("EventDetailCode").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Message:</b>
					</td>
					<td>
						<asp:Label ID="lMessage" runat="server" Text='<%# Eval("Message").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Application Path:</b>
					</td>
					<td>
						<asp:Label ID="lApplicationPath" runat="server" Text='<%# Eval("ApplicationPath").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Application Virtual Path:</b>
					</td>
					<td>
						<asp:Label ID="lApplicationVirtualPath" runat="server" Text='<%# Eval("ApplicationVirtualPath").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Machine Name:</b>
					</td>
					<td>
						<asp:Label ID="lMachineName" runat="server" Text='<%# Eval("MachineName").ToString() %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Request Url:</b>
					</td>
					<td>
						<asp:Label ID="lRequestUrl" runat="server" Text='<%# Eval("RequestUrl") %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Exception Type:</b>
					</td>
					<td>
						<asp:Label ID="lExceptionType" runat="server" Text='<%# Eval("ExceptionType") %>' />
					</td>
				</tr>
				<tr>
					<td>
						<b>Details:</b>
					</td>
					<td>
						<asp:Label ID="lDetails" runat="server" Text='<%# HtmlEncode(Eval("Details")) %>' />
					</td>
				</tr>
			</table>
		</ItemTemplate>
		<EmptyDataTemplate>
			<div runat="server" id="EmptyDataContent">
				<table cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td align="center">
							<b>No data was returned.</b>
						</td>
					</tr>
				</table>
			</div>
		</EmptyDataTemplate>
	</asp:FormView>
	</br>
	<%--	<asp:ObjectDataSource ID="dsErrorDetail" runat="server" SelectMethod="GetLogEntry"
		TypeName="TBW.CentralLogging.Logic.DAL.LogEntryManager" OnSelecting="SelectDetail">
		<SelectParameters>
			<asp:Parameter Name="eventId" Type="Object" />
			<asp:Parameter Name="isFillLinkedEntries" Type="Boolean" />
		</SelectParameters>
	</asp:ObjectDataSource>
--%>
	</ContentTemplate>
	</form>
</body>
</html>
